package charts.series.bars ;

import flash.display.Sprite;
import charts.series.bars.Base;

class Outline extends Base {
		var outline: Float;
	
	public function new ( index: Int, style:Dynamic, group: Float )	{
		
		super( index, style, style.color, style.tip, style.alpha, group );
		this.outline = Reflect.field(style,'outline_color');
	}
	
	public override function resize ( sc:ScreenCoordsBase ):Void {
		
		var h:Dynamic = this.resize_helper( cast(sc,ScreenCoords));
		
		this.graphics.clear();
		this.graphics.lineStyle(1, this.outline, 1);
		this.graphics.beginFill( this.color, 1.0 ); // TODO - change type of this.color in Base to Int
		this.graphics.moveTo( 0, 0 );
		this.graphics.lineTo( h.width, 0 );
		this.graphics.lineTo( h.width, h.height );
		this.graphics.lineTo( 0, h.height );
		this.graphics.lineTo( 0, 0 );
		this.graphics.endFill();
		
	}
}
